const express = require("express")
const router = express.Router()
const userCtrl = require('../controller/user')
const userValidator = require('../validator/user')
const auth = require('../middleware/auth')

router.post('/user/login',userValidator.login,userCtrl.login)

router.post('/user/register', userValidator.register,userCtrl.registration)

router.get('/user', auth,userCtrl.getCurrentUser)

router.put('/user',auth,userValidator.updateUser,userCtrl.updateUser)

module.exports = router